﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>SMEs Customer 360 Degree</title>
    <link rel="shortcut icon" href="~/Images/favicon.ico" />
    <!-- Bootstrap -->
    <link href="~/Scripts/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="~/Scripts/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <!-- PNotify -->
    <link href="~/Scripts/vendors/pnotify/dist/pnotify.css" rel="stylesheet">
    <link href="~/Scripts/vendors/pnotify/dist/pnotify.buttons.css" rel="stylesheet">
    <link href="~/Scripts/vendors/pnotify/dist/pnotify.nonblock.css" rel="stylesheet">
    <!-- Ion.RangeSlider -->
    <link href="~/Scripts/vendors/normalize-css/normalize.css" rel="stylesheet">
    <link href="~/Scripts/vendors/ion.rangeSlider/css/ion.rangeSlider.css" rel="stylesheet">
    <link href="~/Scripts/vendors/ion.rangeSlider/css/ion.rangeSlider.skinFlat.css" rel="stylesheet">
    <!-- Select2 -->
    <link href="~/Scripts/vendors/select2/dist/css/select2.min.css" rel="stylesheet">
    <!-- iCheck -->
    <link href="~/Scripts/vendors/iCheck/skins/flat/green.css" rel="stylesheet">
    <!--Table editable-->
    <link href="~/Scripts/tableeditable/service.flextabledit.jquery.css" rel="stylesheet">
    <!-- Add IntroJs styles -->
    <link href="~/Scripts/tourguideintro/introjs.css" rel="stylesheet">
    <!-- Switchery -->
    <link href="~/Scripts/vendors/switchery/dist/switchery.min.css" rel="stylesheet">
    <!-- jQuery custom content scroller -->
    <link href="~/Scripts/vendors/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.min.css" rel="stylesheet" />
    <!-- Datatables -->
    <link href="~/Scripts/vendors/datatables.net-bs/css/dataTables.bootstrap.min.css" rel="stylesheet">
    <link href="~/Scripts/vendors/datatables.net-buttons-bs/css/buttons.bootstrap.min.css" rel="stylesheet">
    <link href="~/Scripts/vendors/datatables.net-fixedheader-bs/css/fixedHeader.bootstrap.min.css" rel="stylesheet">
    <link href="~/Scripts/vendors/datatables.net-responsive-bs/css/responsive.bootstrap.min.css" rel="stylesheet">
    <link href="~/Scripts/vendors/datatables.net-scroller-bs/css/scroller.bootstrap.min.css" rel="stylesheet">
    <!-- Dropzone.js -->
    <link href="~/Scripts/vendors/dropzone/dist/min/dropzone.min.css" rel="stylesheet">
    <!-- Custom Theme Style -->
    <link href="/content/custom.css" rel="stylesheet">
    <link href="/content/smeCustomerCustom.css" rel="stylesheet">

    <!-- back to top-->
    <link rel="stylesheet" href="~/Scripts/vendors/backtotop/style.css"> <!-- Gem style -->
</head>
<body class="nav-md">
    <div class="container body">
        <div class="main_container">
            @if (User.Identity.IsAuthenticated)
            {
                <div class="col-md-3 left_col">
                    <div class="left_col scroll-view">
                        @Html.Action("Sidebar", "System")
                    </div>
                </div>
                <!-- top navigation -->
                <div class="top_nav">
                    <div class="nav_menu">
                        @Html.Action("HeaderMenu", "System")
                    </div>
                </div>
                <!-- /top navigation -->
            }
            <!-- page content -->
            @if (User.Identity.IsAuthenticated)
            {
                <div class="right_col sme_body" role="main">
                    @RenderSection("featured", required: false)
                    <section class="content-wrapper main-content clear-fix">
                        <div class="clearfix"></div>
                        <div class="row">
                            <div class="col-md-12">
                                <div class="x_panel">
                                    <div class="x_content">
                                        @RenderBody()
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                </div>
            }
            else
            {
                @RenderSection("featured", required: false)
                @RenderBody()
            }
            <!-- /page content -->
            <!-- footer content -->
            <footer>
                <div class="pull-right">
                    <p style="margin:0px;">@SMECustomerWebsite.Core.Resources.Resource.NoteLoginPage</p>
                </div>
                <div class="clearfix"></div>
            </footer>
            <!-- /footer content -->
        </div>
    </div>

    <a href="#0" class="cd-top">Top</a>
    @*<div id="custom_notifications" class="custom-notifications dsp_none">
            <ul class="list-unstyled notifications clearfix" data-tabbed_notifications="notif-group"></ul>
            <div class="clearfix"></div>
            <div id="notif-group" class="tabbed_notifications"></div>
        </div>*@
    <!-- jQuery -->
    <script src="~/Scripts/vendors/jquery/dist/jquery-1.10.2.min.js"></script>
    <!-- Bootstrap -->
    <script src="~/Scripts/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="~/Scripts/vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="~/Scripts/vendors/nprogress/nprogress.js"></script>
    <!-- ECharts -->
    <script src="~/Scripts/vendors/echarts/dist/echarts.min.js"></script>
    <!-- Ion.RangeSlider -->
    <script src="~/Scripts/vendors/ion.rangeSlider/js/ion.rangeSlider.min.js"></script>
    <!-- Select2 -->
    <script src="~/Scripts/vendors/select2/dist/js/select2.full.min.js"></script>
    <!-- PNotify -->
    <script src="~/Scripts/vendors/pnotify/dist/pnotify.js"></script>
    <script src="~/Scripts/vendors/pnotify/dist/pnotify.buttons.js"></script>
    <script src="~/Scripts/vendors/pnotify/dist/pnotify.nonblock.js"></script>
    <!-- bootstrap-wysiwyg -->
    <script src="~/Scripts/vendors/bootstrap-wysiwyg/js/bootstrap-wysiwyg.min.js"></script>
    <script src="~/Scripts/vendors/jquery.hotkeys/jquery.hotkeys.js"></script>
    <script src="~/Scripts/vendors/google-code-prettify/src/prettify.js"></script>
    <!-- bootstrap-progressbar -->
    <script src="~/Scripts/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
    <!-- Datatables -->
    <script src="~/Scripts/vendors/datatables.net/js/jquery.dataTables.js"></script>
    <script src="~/Scripts/vendors/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
    <script src="~/Scripts/vendors/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
    <script src="~/Scripts/vendors/datatables.net-buttons-bs/js/buttons.bootstrap.min.js"></script>
    <script src="~/Scripts/vendors/datatables.net-buttons/js/buttons.flash.min.js"></script>
    <script src="~/Scripts/vendors/datatables.net-buttons/js/buttons.html5.js"></script>
    <script src="~/Scripts/vendors/datatables.net-buttons/js/buttons.print.min.js"></script>
    <script src="~/Scripts/vendors/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
    <script src="~/Scripts/vendors/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
    <script src="~/Scripts/vendors/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
    <script src="~/Scripts/vendors/datatables.net-responsive-bs/js/responsive.bootstrap.js"></script>
    <script src="~/Scripts/vendors/datatables.net-scroller/js/datatables.scroller.min.js"></script>
    <script src="~/Scripts/vendors/jszip/dist/jszip.min.js"></script>
    <script src="~/Scripts/vendors/pdfmake/build/pdfmake.min.js"></script>
    <script src="~/Scripts/vendors/pdfmake/build/vfs_fonts.js"></script>
    <!-- jQuery custom content scroller -->
    <script src="~/Scripts/vendors/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js"></script>

    <!-- Custom Theme Scripts -->
    <script src="~/Scripts/custom.js"></script>
    <!--Back to top-->
    <script src="~/Scripts/vendors/backtotop/main.js"></script>
    @*<script type="text/javascript" src="~/Scripts/ckeditor/ckeditor.js"></script>*@
    @if (User.Identity.IsAuthenticated)
    {
        <script type="text/javascript">
            $(document).ready(function () {
                function initToolbarBootstrapBindings() {
                    var fonts = ['Serif', 'Sans', 'Arial', 'Arial Black', 'Courier',
                        'Courier New', 'Comic Sans MS', 'Helvetica', 'Impact', 'Lucida Grande', 'Lucida Sans', 'Tahoma', 'Times',
                        'Times New Roman', 'Verdana'
                    ],
                      fontTarget = $('[title=Font]').siblings('.dropdown-menu');
                    $.each(fonts, function (idx, fontName) {
                        fontTarget.append($('<li><a data-edit="fontName ' + fontName + '" style="font-family:\'' + fontName + '\'">' + fontName + '</a></li>'));
                    });
                    $('a[title]').tooltip({
                        container: 'body'
                    });
                    $('.dropdown-menu input').click(function () {
                        return false;
                    })
                      .change(function () {
                          $(this).parent('.dropdown-menu').siblings('.dropdown-toggle').dropdown('toggle');
                      })
                      .keydown('esc', function () {
                          this.value = '';
                          $(this).change();
                      });

                    $('[data-role=magic-overlay]').each(function () {
                        var overlay = $(this),
                          target = $(overlay.data('target'));
                        overlay.css('opacity', 0).css('position', 'absolute').offset(target.offset()).width(target.outerWidth()).height(target.outerHeight());
                    });

                    if ("onwebkitspeechchange" in document.createElement("input")) {
                        var editorOffset = $('#editor').offset();

                        $('.voiceBtn').css('position', 'absolute').offset({
                            top: editorOffset.top,
                            left: editorOffset.left + $('#editor').innerWidth() - 35
                        });
                    } else {
                        $('.voiceBtn').hide();
                    }
                }

                function showErrorAlert(reason, detail) {
                    var msg = '';
                    if (reason === 'unsupported-file-type') {
                        msg = "Unsupported format " + detail;
                    } else {
                        console.log("error uploading file", reason, detail);
                    }
                    $('<div class="alert"> <button type="button" class="close" data-dismiss="alert">&times;</button>' +
                      '<strong>File upload error</strong> ' + msg + ' </div>').prependTo('#alerts');
                }

                initToolbarBootstrapBindings();

                $('#editor').wysiwyg({
                    fileUploadError: showErrorAlert
                });

                prettyPrint();
            });

            $('#send_qa').click(function () {
                //var editorData = CKEDITOR.instances.editor1.getData();
                $.ajax({
                    url: '@Url.Action("SendQA", "System")',
                    type: "POST",
                    data: { data: $('#editor').html() },
                    success: function (data_response) {
                        if (data_response == true) {
                            $('.compose').slideToggle();
                            new PNotify({
                                title: 'Regular Success',
                                text: 'That thing that you were trying to do worked!',
                                type: 'success',
                                styling: 'bootstrap3'
                            });
                        } else {
                            new PNotify({
                                title: 'Oh No!',
                                text: 'Something terrible happened.',
                                type: 'error',
                                styling: 'bootstrap3'
                            });
                        }
                    },
                    error: function (data_response) {
                        new PNotify({
                            title: 'Oh No!',
                            text: 'Something terrible happened.',
                            type: 'error',
                            styling: 'bootstrap3'
                        });
                    }
                });
            });
        </script>
    }

    <!-- compose -->
    <script>
        $('#compose, .compose-close').click(function () {
            $('.compose').slideToggle();
        });
    </script>
    <!-- /compose -->
    @if (User.Identity.IsAuthenticated)
    {
        <script type="text/javascript" src="~/Scripts/tourguideintro/intro.js"></script>
        <script type="text/javascript">

            function createCookie(name, value, days) {
                if (days) {
                    var date = new Date();
                    date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
                    var expires = "; expires=" + date.toGMTString();
                }
                else var expires = "";
                document.cookie = name + "=" + value + expires + "; path=/";
            }

            function readCookie(name) {
                var nameEQ = name + "=";
                var ca = document.cookie.split(';');
                for (var i = 0; i < ca.length; i++) {
                    var c = ca[i];
                    while (c.charAt(0) == ' ') c = c.substring(1, c.length);
                    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
                }
                return null;
            }

            function eraseCookie(name) {
                createCookie(name, "", -1);
            }

            $(document).ready(function () {
                var x = readCookie('isFirst');
                if (x == null) {
                    @*var introStart = introJs();
                    var steps = [{
                        element: '#sidebar-footer',
                        intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideHelper',
                        position: 'top'
                    }];
                    introStart.setOptions({
                        steps: steps,
                        scrollToElement: false,
                    });
                    introStart.start();
                    createCookie('isFirst', true, 30);*@
                }
            });


            function decodeHtml(html) {
                var txt = document.createElement("textarea");
                txt.innerHTML = html;
                return txt.value;
            }

            function startTourGuide() {
                var intro = introJs();
                var steps = [{
                    element: '#sme-logo',
                    intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideLogo'
                }, {
                    element: '#sme-dao-info',
                    intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideDaoInfo',
                    position: 'right'
                }];
                if ($('#sme-header-alert').length > 0) {
                    steps.push({
                        element: '#sme-header-alert',
                        intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideHeaderAlert',
                        position: 'bottom'
                    });
                }
                if ($('#sme-header-dashboard').length > 0) {
                    steps.push({
                        element: '#sme-header-dashboard',
                        intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideHeaderDashboard',
                        position: 'left'
                    });
                }
                if ($('#sme-header-sale-manager').length > 0) {
                    steps.push({
                        element: '#sme-header-sale-manager',
                        intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideHeaderSalePerform',
                        position: 'bottom'
                    });
                }
                if ($('#sme-header-total-cust').length > 0) {
                    steps.push({
                        element: '#sme-header-total-cust',
                        intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideHeaderCustMan',
                        position: 'bottom'
                    });
                }
                if ($('#sme-header-port-man').length > 0) {
                    steps.push({
                        element: '#sme-header-port-man',
                        intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideHeaderPortMan',
                        position: 'bottom'
                    });
                }
                if ($('#sme-header-sale-act').length > 0) {
                    steps.push({
                        element: '#sme-header-sale-act',
                        intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideHeaderSaleAct',
                        position: 'bottom'
                    });
                }
                if ($('#sme-header-cust-detail').length > 0) {
                    steps.push({
                        element: '#sme-header-cust-detail',
                        intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideHeaderCustDetail',
                        position: 'bottom'
                    });
                }
                if ($('#sme-header-imex').length > 0) {
                    steps.push({
                        element: '#sme-header-imex',
                        intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideHeaderIMEX',
                        position: 'left'
                    });
                }
                if ($('#sme-header-cust-msbo').length > 0) {
                    steps.push({
                        element: '#sme-header-cust-msbo',
                        intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideHeaderMSBO',
                        position: 'left'
                    });
                }
                if ($('#sme-header-product_handbook').length > 0) {
                    steps.push({
                        element: '#sme-header-product_handbook',
                        intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideHeaderProHand',
                        position: 'left'
                    });
                }
                if ($('#sme-header-xselling').length > 0) {
                    steps.push({
                        element: '#sme-header-xselling',
                        intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideHeaderXselling',
                        position: 'left'
                    });
                }
                if ($('#sme-header-hunting').length > 0) {
                    steps.push({
                        element: '#sme-header-hunting',
                        intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideHeaderHunting',
                        position: 'left'
                    });
                }
                if ($('#sme-header-productivity').length > 0) {
                    steps.push({
                        element: '#sme-header-productivity',
                        intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideHeaderProductivity',
                        position: 'left'
                    });
                }
                steps.push({
                    element: '#tour-guide',
                    intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideQuickFunGuide',
                    position: 'top'
                });
                steps.push({
                    element: '#compose',
                    intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideQuickFunEmail',
                    position: 'top'
                });
                steps.push({
                    element: '#change-lang',
                    intro: '@SMECustomerWebsite.Core.Resources.Resource.TourGuideQuickFunLang',
                    position: 'top'
                });
                intro.setOptions({
                    steps: steps,
                    showProgress: true,
                    scrollToElement: true,
                });
                intro.setOption('tooltipPosition', 'auto');
                intro.setOption('positionPrecedence', ['left', 'right', 'bottom', 'top'])
                intro.start();
            }
        </script>
    }
    @RenderSection("scripts", required: false)
    @*@StackExchange.Profiling.MiniProfiler.RenderIncludes()*@
</body>
</html>
